﻿#region

using System;
using System.Collections.Generic;
using NetBay.Core.BusinessEntities;
using Rio.Framework.Pages.Enums;

#endregion

namespace Rio.Framework.Pages.Events
{
    public delegate void PasteCopyEventHandler(object sender, PasteCopyEventArgs args);

    public class PasteCopyEventArgs : EventArgs
    {
        #region Readonly & Static Fields

        private readonly PasteCopyActionType _action;
        private Folder _sourceFolder;

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="PasteCopyEventArgs" /> class.
        /// </summary>
        /// <param name="action">The action.</param>
        public PasteCopyEventArgs(PasteCopyActionType action)
            : this(action, null)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PasteCopyEventArgs" /> class.
        /// </summary>
        /// <param name="action">The action.</param>
        /// <param name="sourceFolder">The source folder.</param>
        public PasteCopyEventArgs(PasteCopyActionType action, Folder sourceFolder)
            : this(action, sourceFolder, null)
        { 
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PasteCopyEventArgs"/> class.
        /// </summary>
        /// <param name="action">The action.</param>
        /// <param name="sourceFolder">The source folder.</param>
        /// <param name="documents">The documents.</param>
        public PasteCopyEventArgs(PasteCopyActionType action, Folder sourceFolder, List<long> documents)
        {
            _action = action;
            _sourceFolder = sourceFolder;
            Documents = documents;
        }

        #endregion

        #region Instance Properties

        public bool Cancel { get; set; }

        public PasteCopyActionType Action
        {
            get
            {
                return _action;
            }
        }

        public Folder SourceFolder
        {
            get
            {
                return _sourceFolder;
            }
            set
            {
                _sourceFolder = value;
            }
        }

        public List<long> Documents { get; set; }

        #endregion
    }
}